! function(window, document, $) {


    $(".searchBtn").on("click", function() {
        let key = $(".searchInner>input").val();
        if (key) {
            let arr = JSON.parse(localStorage.getItem("key")) || [];
            arr.push(key);
            //设置
            localStorage.setItem("key", JSON.stringify(arr));
            location.href = "http://localhost:3000/m/searchList.html?key=" + key;

        } else {
            mui.toast('请填写搜索关键字', { duration: 'long', type: 'div' })
        }

    })

    function renderSearchList() {
        //读取
        let arr = localStorage.getItem("key");
        if (!arr) {
            return
        }
        arr = JSON.parse(arr);
        console.log(arr)
    }

    renderSearchList()


}(window, document, Zepto, undefined)